﻿@page "/sdk/objects/entity/r/{ParentRecordId}/rl/fields/c/select"

@model WebVella.Erp.Plugins.SDK.Pages.ErpEntity.CreateFieldSelectModel
@{
	Layout = "~/Pages/_AppMaster.cshtml";
	ViewData["Title"] = "Entity Fields";
}
<wv-page-header color="@Model.ErpEntity.Color" area-label="Entities" title="@Model.ErpEntity.Name" subtitle="Create Field"
				icon-class="fa fa-plus" return-url="@Model.ReturnUrl">
	<wv-page-header-actions>
		@foreach (var action in Model.HeaderActions)
		{
			@Html.Raw(action)
		}
	</wv-page-header-actions>

	<wv-page-header-toolbar>
		@foreach (var action in Model.HeaderToolbar)
		{
			@Html.Raw(action)
		}
	</wv-page-header-toolbar>
</wv-page-header>

<h2>Select a field type</h2>
<wv-row class="mt-4">
	@foreach (var fieldCard in Model.FieldCards)
	{
		<wv-column span="4" span-xl="3">
			<wv-icon-card title="@fieldCard["label"]" class="mb-3" description="@fieldCard["description"]" icon-class="@fieldCard["class"]" body-link="@Html.Raw(Model.CreateFieldUrl + fieldCard["type"])">
			</wv-icon-card>
		</wv-column>
	}
</wv-row>

